package com.songcha.module_bookreader.ui.fragment.slide

import com.songcha.library_base.mvvm.base.BaseRepository
import com.songcha.library_business.api.ApiManager
import com.songcha.library_network.bean.BaseBean
import io.reactivex.Observable
import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONObject

class BookReadSlideRepository:BaseRepository() {
    fun addToBookShelf(bookId: Int): Observable<BaseBean> {
        val json= JSONObject().apply {
            put("bookId",bookId)
        }
        return ApiManager.api.addToBookShelf(json.toString().toRequestBody())
    }
}